package com.example.demo.pojo.enums.common;

import lombok.AllArgsConstructor;
import lombok.Getter;


/**
 * @Company
 * @ClassName SysErrorEnum
 * @Description 业务异常枚举
 * @author tds
 * @Date 2022-03-28 23:59
 * @version 1.0.0
 */
@Getter
@AllArgsConstructor
public enum BusinessErrorEnum {

	// ---------------- 000001-019999，常用业务异常 -----------------
	USER_NOT_EXIST("0001","用户不存在");
	
	private String code;
	private String name;
	
	public static BusinessErrorEnum valueCodeOf(String code){
		for(BusinessErrorEnum mode :values()){
			if (mode.getCode().equals(code)) {
				return mode;
			}
		}
		return null;
	}

}
